﻿<script src ="/ticket/scripts/workBusDetail.js?v=1.0"></script>
<script src ="scripts/utility.js"></script>
<script src ="scripts/httpService.js"></script>
<div class="pageheader">
    <h2><i class="fa fa-hand-o-up"></i> 工作日班车管理 <span>车次详情</span></h2>
</div>

<div class="contentpanel" ng-app="workBusDetailApp" ng-controller="workBusDetailCtrl">
    <div class="row xg-content">
        <div class="col-xs-12">
            <div class="btn-group">
                <button type="button" class="btn btn-warning" ng-click="refreshBuses()">
                    <span class="glyphicon glyphicon-refresh"></span> 刷新
                </button>
                <button type="button" class="btn btn-primary" ng-click="addBuses()">
                    <span class="glyphicon glyphicon-pencil"></span> 添加
                </button>
                <button type="button" class="btn btn-danger" ng-click="deleteBuses()">
                    <span class="glyphicon glyphicon-trash"></span> 删除
                </button>
                <button type="button" class="btn btn-success" ng-click="updateBuses()">
                    <span class="glyphicon glyphicon-send"></span> 更新
                </button>

            </div>
            <table class="table table-striped table-hover">
                <tr>
                    <th>选择</th>
                    <th>路线</th>
                    <th>出发时间</th>
                    <th>座位数</th>
                    <th>审核中</th>
                    <th>已审核</th>
                    <th>生效时间</th>
                    <th>截止时间</th>
                    <th>需审核</th>
                    <th>生成时间</th>
                    <th>备注</th>
                </tr>

                <tr ng-repeat="bus in buses" ng-click="selectChange($index)">
                    <td>
                    <input type="checkbox" ng-model="bus.checked"/>
                    </td>
                    <td ng-bind="bus.routeName"></td>
                    <td ng-bind="bus.departureDate"></td>
                    <td ng-bind="bus.seatsCount"></td>
                    <td ng-bind="bus.auditingCount"></td>
                    <td ng-bind="bus.auditedCount"></td>
                    <td ng-bind="bus.validityDate"></td>
                    <td ng-bind="bus.endBusDate"></td>
                    <td ng-if="bus.isNeedAudit">是</td>
                    <td ng-if="!bus.isNeedAudit">否</td>
                    <td ng-bind="bus.addDate"></td>
                    <td ng-bind="bus.other"></td>
                </tr>
            </table>
        </div>
    </div>

    <script type="text/ng-template" id="insertBuses">
        <div class='modal-content'>
        <div class='modal-header'>
        <button type='button' class='close' data-dismiss='modal' ng-click="close()" >&times;</button>
        <h2 class='modal-title' style="padding-left:40%" id='addParkLabel'>班车信息</h2>
        </div>

        <div class='modal-body '>
        <form class='form-horizontal' role='form'>
        <div class="panel panel-info">
        <div class="panel-heading">
        <h3 class="panel-title">

        </h3>
        </div>
        <div class="panel-body">
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >路线</label>
        </div>
        <div class='col-sm-8'>
        <select class="form-control" ng-options="route.id as route.name for route in routes" ng-model="bus.routeid">
        </select>
        </div>
        </div>
        <div class='form-group'>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >发车时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.departuredate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >生效时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.validitydate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >截止时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.endbusdate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
          <label class='control-label' style="float:right" >是否审核</label>
        </div>
        <div class='col-sm-8'>
        <input type="checkbox" style="margin-top:15px" ng-model="bus.isneedaudit"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >座位数</label>
        </div>
        <div class='col-sm-3'>
        <input class="form-control" ng-model="bus.seatscount"/>
        </div>
        </div>

        <div class='form-group'>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >备注</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control"   ng-model="bus.other"/>
        </div>
        </div>
        </div>
        </form>
        </div>

        <div class="alert alert-info" ng-show="loading || submitted">
        <span  ng-show='loading' > <i class="fa fa-spinner"></i></span>
        <span ng-show='submitted'>{{result}}</span>
        </div>

        <div class='modal-footer'>
        <button type='button' class='btn btn-default' id="modalCloseBtn" data-dismiss='modal' ng-click="close()">关闭</button>
        <button id="submitParkBtn" type='button'ng-click="submit()" class='btn btn-primary'>提交</button>
        </div>
        </div>
    </script>

        <script type="text/ng-template" id="modifyBuses">
        <div class='modal-content'>
        <div class='modal-header'>
        <button type='button' class='close' data-dismiss='modal' ng-click="close()" >&times;</button>
        <h2 class='modal-title' style="padding-left:40%" id='addParkLabel'>班车信息</h2>
        </div>

        <div class='modal-body '>
        <form class='form-horizontal' role='form'>
        <div class="panel panel-info">
        <div class="panel-heading">
        <h3 class="panel-title">

        </h3>
        </div>
        <div class="panel-body">
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >路线</label>
        </div>
        <div class='col-sm-8'>
        <select class="form-control" ng-options="route.id as route.name for route in routes" ng-model="bus.routeId">
        </select>
        </div>
        </div>
        <div class='form-group'>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >发车时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.departureDate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >生效时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.validityDate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >截止时间</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control" ng-model="bus.endBusDate"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
          <label class='control-label' style="float:right" >是否审核</label>
        </div>
        <div class='col-sm-8'>
        <input type="checkbox" style="margin-top:15px" ng-model="bus.isNeedAudit"/>
        </div>
        </div>
        <div class='form-group '>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >座位数</label>
        </div>
        <div class='col-sm-3'>
        <input class="form-control" ng-model="bus.seatsCount"/>
        </div>
        </div>

        <div class='form-group'>
        <div class="col-sm-2 ">
        <label class='control-label' style="float:right" >备注</label>
        </div>
        <div class='col-sm-8'>
        <input class="form-control"   ng-model="bus.other"/>
        </div>
        </div>
        </div>
        </form>
        </div>

        <div class="alert alert-info" ng-show="loading || submitted">
        <span  ng-show='loading' > <i class="fa fa-spinner"></i></span>
        <span ng-show='submitted'>{{result}}</span>
        </div>

        <div class='modal-footer'>
        <button type='button' class='btn btn-default' id="modalCloseBtn" data-dismiss='modal' ng-click="close()">关闭</button>
        <button id="submitParkBtn" type='button'ng-click="submit()" class='btn btn-primary'>提交</button>
        </div>
        </div>
    </script>
</div><!-- contentpanel -->
</div><!-- mainpanel -->
<script src="js/xg_js.js"></script>
<script>createMenu(6);</script>
